package com.example.hospital.api.controller.form;

import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
/**
 * @Description //TODO
 * @Param $
 * @return $
 * @Date $ $
 * @Author wj
 **/

public class SearchDoctorByPageForm {
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,20}$", message = "name内容不正确")
    private String name;

    @Min(value = 1, message = "deptId不能小于1")
    private Integer deptId;

    @Pattern(regexp = "^本科$|^研究生$|^博士$", message = "degree内容不正确")
    private String degree;

    @Pattern(regexp = "^主治医师$|^副主治医师$|^主任医师$|^副主任医师$", message = "job内容不正确")
    private String job;

    private Boolean recommended;

    @NotNull(message = "status不能为空")
    @Range(min = 1, max = 3, message = "status内容不正确")
    private Byte status;

    @Pattern(regexp = "^ASC$|^DESC$", message = "order内容不正确")
    private String order;

    @NotNull(message = "page不能为空")
    @Min(value = 1, message = "page不能小于1")
    private Integer page;

    @NotNull(message = "length不能为空")
    @Range(min = 10, max = 50, message = "length内容不正确")
    private Integer length;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public String getDegree() {
        return degree;
    }

    public void setDegree(String degree) {
        this.degree = degree;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public Boolean getRecommended() {
        return recommended;
    }

    public void setRecommended(Boolean recommended) {
        this.recommended = recommended;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getLength() {
        return length;
    }

    public void setLength(Integer length) {
        this.length = length;
    }

    public SearchDoctorByPageForm(@Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,20}$", message = "name内容不正确") String name, @Min(value = 1, message = "deptId不能小于1") Integer deptId, @Pattern(regexp = "^本科$|^研究生$|^博士$", message = "degree内容不正确") String degree, @Pattern(regexp = "^主治医师$|^副主治医师$|^主任医师$|^副主任医师$", message = "job内容不正确") String job, Boolean recommended, @NotNull(message = "status不能为空") @Range(min = 1, max = 3, message = "status内容不正确") Byte status, @Pattern(regexp = "^ASC$|^DESC$", message = "order内容不正确") String order, @NotNull(message = "page不能为空") @Min(value = 1, message = "page不能小于1") Integer page, @NotNull(message = "length不能为空") @Range(min = 10, max = 50, message = "length内容不正确") Integer length) {
        this.name = name;
        this.deptId = deptId;
        this.degree = degree;
        this.job = job;
        this.recommended = recommended;
        this.status = status;
        this.order = order;
        this.page = page;
        this.length = length;
    }

    public SearchDoctorByPageForm() {
    }

}

